package com.pulse.base.mapper;

import com.pulse.base.domain.CircuitMeasureRefer;
import org.apache.ibatis.annotations.Param;

/**
 * @ClassName CircuitMeasureReferMapper
 * @Description
 * @Author 陆帅
 * @Date 2024/8/6 14:25
 */
public interface CircuitMeasureReferMapper {

    /**
     * 根据设备编号和端口查询
     * @param deviceNo
     * @param channel
     * @return
     */
    CircuitMeasureRefer selectByDeviceNoAndChannel(@Param("deviceNo")String deviceNo, @Param("channel")Integer channel);

    /**
     * 新增
     * @param circuitMeasureRefer
     * @return
     */
    int insertCircuitMeasureRefer(CircuitMeasureRefer circuitMeasureRefer);

    /**
     * 修改
     * @param circuitMeasureRefer
     * @return
     */
    int updateCircuitMeasureRefer(CircuitMeasureRefer circuitMeasureRefer);

    /**
     * 根据id删除
     * @param referId
     * @return
     */
    int deleteCircuitMeasureReferByReferId(Long referId);

    /**
     * 根据id列表删除
     * @param referIds
     * @return
     */
    int deleteCircuitMeasureReferByReferIds(Long[] referIds);

    /**
     * 根据设备编号和端口号删除
     * @param deviceNo
     * @param channel
     * @return
     */
    int deleteCircuitMeasureReferByDeviceNoAndChannel(@Param("deviceNo")String deviceNo, @Param("channel")Integer channel);


    /**
     * 根据measureId删除
     * @param measureId
     * @return
     */
    int deleteCircuitMeasureReferByMeasureId(Long measureId);

    /**
     * 根据设备编号删除
     * @param deviceNo
     * @return
     */
    int deleteCircuitMeasureReferByDeviceNo(String deviceNo);
}
